---
title: Is welfare state the priority? Refugees flow  through Europe and their target countries
author:
  - name: Stephanie Moura de Oliveira
    email: stephaniemoura.cp@gmail.com
    affiliation: Universidade Federal de Pernambuco - UFPE
    footnote: Corresponding Author

address:
  - code: Universidade Federal de Pernambuco - UFPE
    address: Universidade Federal de Pernambuco
    
abstract: | 
  Over the past years, the civil war in Syria and all the danger that accompanies it, caused a great number of syrian nationals to leave their homes and their nation with the main objective of surviving the attacks suffered daily in the country.
  The Syrian refugees are crossing european borders for the past years and this is causing a malaise between the war refugees and nationals of the countries that receive them. In this paper, we will evaluate whether the welfare state and quality of life indexes of European countries have been attractive enough for Syrian nationals who have left their country to spend time or establish their permanent residence, or if only the prospect of having a peaceful space and safe to live for a period of time and then return to their country of origin is enough.
  In this paper we analyze the intentions of the refugees when seeking an asylum and the connexion between variables that express quality of life and the entry and asylum of syrian refugees on 2011 and 2015, years that represent the biggest influxes of syrians in Europe, after the Arab Spring and during the war.

journal: "European Commission Press Release Database"
date: "`r Sys.Date()`"
references: 
  - id: franstimmermans
    title: Speech by First Vice-President Frans Timmermans at the European Parliament plenary session on the preparation of the European Council meeting of 28 and 29 June 2018
    author: 
      - family: Timmermans
        given: Frans
    container title: European Commission
    volume: 
    URL: http://europa.eu/rapid/press-release_SPEECH-18-4142_en.htm
    DOI:
    issue:
    publisher: European Commission
    page: 
    type: article-journal
    issued:
      year: 2018
      month: 6
      journal: "Carta Maior"
  - id: leneide
    title: Imigração e refugiados na Europa - O desafio do século
    author: 
      - family: Duarte-Plon
        given: Leneide
    container title: Carta Maior
    volume: 
    URL: https://www.cartamaior.com.br/?/Editoria/Internacional/Imigracao-e-refugiados-na-Europa-O-desafio-do-seculo/6/34349
    DOI:
    issue:
    publisher: 
    page: 
    type: article-journal
    issued:
      year: 2015
      month: 8
      journal: "European Journal of Sociology"
  - id: briggs
    title: The Welfare State in Historical Perspective
    author: 
      - family: Briggs
        given: Asa
    container title: 
    volume: 2
    URL: https://www.cambridge.org/core/journals/european-journal-of-sociology-archives-europeennes-de-sociologie/article/welfare-state-in-historical-perspective/6DD16AF993288356DC154B558FCEA3CF
    DOI: https://doi.org/10.1017/S0003975600000412
    issue: 2
    publisher: Archives Européennes de Sociologie
    page: 221-258
    type: article-journal
    issued: 
      year: 1961
      month: 12
      journal: "Book"
  - id: marshall
    title: Citizenship and Social Class
    author: 
      - family: Marshall
        given: Thomas Humphrey
    container title: 
    volume: 
    URL: 
    DOI: 
    issue: 
    publisher: Pluto Press
    page: 
    type: article-journal
    issued: 
      year: 1992
      month: 
      journal: "The Quality of Government Institute"
  - id: qog
    title: The Quality of Government Standard Dataset, version Jan18. 
    author: 
      - family: Teorell
        given: Jan
      - family: Dahlberg
        given: Stefan
      - family: Holmberg
        given: Sören    
      - family: Rothstein
        given: Bo     
      - family: Pachon
        given: Natalia
      - family: Svensson
        given: Richard
    container title: 
    volume: 
    URL: http://www.qog.pol.gu.se 
    DOI: doi:10.18157/QoGStdJan18
    issue: 
    publisher: University of Gothenburg The Quality of Government Institute
    page: 
    type: article-journal
    issued: 
      year: 2018
      month: 1
      journal: "UNHCR"
  - id: briggs
    title: Resettlement population statistics
    author: 
      - family: UNHCR
        given: 
    container title: 
    volume: 
    URL: http://popstats.unhcr.org/en/resettlement
    DOI: 
    issue: 
    publisher: UNHCR Population Statistics Database
    page: 
    type: article-journal
    issued: 
      year: 2017
  
output: rticles::elsevier_article
---


```{r open_packages, echo = FALSE, message = FALSE, warning = FALSE}

# Open Packages

if(require(tidyverse) == F) install.packages('tidyverse'); require (tidyverse)
if(require(readxl) == F) install.packages('readxl'); require (readxl)
if(require(readr) == F) install.packages('readr'); require (readr)
if(require(ggplot2) == F) install.packages('ggplot2'); require (ggplot2)
if(require(stargazer) == F) install.packages('stargazer'); require (stargazer)
if(require(car) == F) install.packages('car'); require (car)

```

```{r open_databases, echo = FALSE, message = FALSE, warning = FALSE} 
# Open Databases


library(readr)
base <- read_delim("dataset-stephanie-preprocess.csv", 
                                         ";", escape_double = FALSE, trim_ws = TRUE)
```

Introduction and Theory
==========================

Countries with higher rates of Welfare State lead to more syrian asylum applications? With the advance of the refugee crisis and a consequent increase on the number of people in need of a new homeland to call its own, European countries have reshaped their immigration policies in order to accommodate (or not) the growing number of refugee requests. 

The country whose internal conflict has caused more nationals to leave its territory was Syria, since after the start of the Arab Spring in 2010 and a series of popular protests in the country, that progressed to a violent armed revolt, influenced by other protests in the Arab world. 

The conflict shows itself in two fronts: one compound by oppositors of the President Bashar Al-Assad, that claims to be struggling to oust his power and then later install a more democratic leadership in the country; and the other composed by Assad and its government, who claims to be only fighting armed terrorists who aim to destabilize the country. Over the years, this war with an initial political cause, turned itself into a "power struggle", also embracing aspects with sectarian and religious natures, that lead to the emergence of many factions that now fight against each other and the government. 

In the middle of this conflict, many civilians found themselves in the middle of bombings, and more than five million Syrians would have tried to escape the fighting, most of them seeking refuge abroad. The conflict generated a huge migratory wave of Syrians and Arabs towards Europe. It is the largest migratory wave and consequent humanitarian crisis faced by Europe since World War II. According to the Vice-President of the European Commission, Frans Timmermans, it is a "world crisis that needs an European answer" [@franstimmermans].

This migratory flow reached critical levels throughout 2015, with an exponential increase (hundreds of thousands of people) trying to enter Europe and applying for asylum. These people flew away of their countries due to wars, conflicts, hunger, religious intolerance, terrible climate change, human rights violations, hopelessness and others, and adding to all this, a massive action of intimidation, violence and oppression carried out by groups that control illegal trafficking exploited these totally vulnerable migrants [@leneide].

But why did so many migrants seek Europe to take refuge instead of seeking asylum in other Middle Eastern or Asian countries closer to their country of origin? The answer to this can maybe be found on a definition of Welfare State:
 “A welfare state is a state in which organized power is deliberately used (through politics and administration) in an effort to modify the play of the market forces in at least three directions
- first, by guaranteeing individuals and families a	minimum income irrespective of the market value of their work or their property;
- second, by narrowing the extent of insecurity by 	enabling individuals and families to meet certain “social contingencies” (for example, sickness, old age and unemployment) which lead otherwise to individual and family crisis; and
- third, by ensuring that all citizens without distinction of status or class are offered the best standards available in relation to a certain agreed range of social services.” [@briggs]

The sociologist T. H. Marshall  described the modern welfare state as a distinctive combination of democracy, welfare and capitalism. As a type of mixed economy, the welfare state funds the governmental institutions for healthcare and education along with direct benefits paid to individual citizens. Modern welfare states include Germany, France, Belgium and the Netherlands, as well as the Nordic countries, which employ a system known as the Nordic Model. The various implementations of the welfare state fall into three categories: (i) social democratic, (ii) conservative, and (iii) liberal. [@marshall]

That said, this paper tries to enlight if countries with a higher Welfare State attract more requests for refuge, these being preferred by refugees from Syria. This analysis is important to help the understanding of the movement trends of refugees if they are looking for countries with a higher quality of life or just a country where they can allocate themselves to escape the conflicts. This may also lead to explanations about the preference of refugees to remain in the place of refuge after the conflict ends or to return to their homeland.

The hypothesis that this work will try to falsify is that the number of requests for refugees from Syria to countries in Europe are influenced by the level of Welfare State of these countries.

Methodology
==============

This paper will use as methodology for data analysis the R software, with which a linear regression will be performed in order to evaluate by country the number of requests for refuge by Syrian citizens. The years to be analyzed are 2011 and 2015, with the aim of analyzing before and after the refugee crisis, after the beginning of the Arab Spring. The objective was to analyze the situation of refugees in a more recent scenario after the onset of the crisis, but because of the lack of data available from more recent years.

For the analysis, two databases will be used, the UNHCR Population Statistics Database, which contains data on asylum and refuge applications for several countries in the world over several years by citizens from different countries. From this database will be taken the dependent variable on the number of asylum requests from Syrians in European countries, the "Applied" variable. In addition to this, the Quality of Government (QOG) standard database of January 2018 will be used, the most complete and up-to-date of QoG's databases. From this database will be taken the independent variables that characterize the welfare state. Variables with greater data availability were searched for the largest number of countries in the analyzed years. Thus, the variables chosen were "Health", "Equitable Education" and "Public Service". Besides these, the variable "Political Rights" is used as control because it is an indicator of democracy and of the country's development then it wants to see the effect of public services controlling for this variable of political development of the country. The effect of not including it can be an overestimation of the effect of the other variable.

Operationalizing the Variables
=============

The research question that we try to answer is: 


**Countries with higher rates of Welfare State lead to more syrian asylum applications?**


In this paper, an analysis about the number of refuge requests from Syria in european countries is made, regarding their level of Welfare. Trying to understand the movement trends of refugees, four variables from the Quality of Government database (QOG Standard - Jan - 2018), and one variable from the United Nations High Commissioner for Refugees (UNHCR Population Statistics - Resettlement) is used in this paper with the object of explaining the most recent refugees movements from Syria to European Countries, trying to understand if the number of refuge requests has some relation with the welfare state level of the countries to which the requests were directed.

That said, it's important to enlight which were the variables used in the paper. The independent variables selected for this paper were extracted from the QOG Basic Database. And these variables were: 

  - **ffp_ps** (using various algorithms, this variable is converted into a score representing the significance of the public services for each country. The smaller, the better); 
  - **bs_ee** (refers to equitable education and the qualitative indicators reflect the evaluations provided by more than 100 experts responding to the SGI’s survey of the state of affairs in various policy areas throughout the OECD and EU. For these indicators, the rating scale ranges from 1 (worst) to 10 (best); 
  - **bs_h** (refers to the quality of the health system. The qualitative indicators reflect the evaluations provided by more than 100 experts responding to the SGI’s survey of the state of affairs in various policy areas throughout  the OECD and EU. For these indicators, the rating scale ranges from 1 (worst) to 10 (best).); 
  - Above these, the **fh_pr** is a variable that refers to political rights, and in this paper is used as a control variable (the specific list of rights considered varies over the years. Countries are graded between 1 (most free) and 7 (least free)). The **fh_pr** variable is used as control because it is an indicator of democracy and of the country's development then wants to see the effect of public services controlling for this variable of political development of the country. The effect of not including it can be an overestimation of the effect of the other variable.
    
```{r summary_variables, echo = FALSE, message = FALSE, warning = FALSE, results='hide'} 
# descriptive summary of the chosen variables

summary(base$bs_ee)
summary(base$bs_h)
summary(base$ffp_ps)
summary(base$fh_pr)
```

```{r ggplot_variables1, echo = FALSE, message = FALSE, warning = FALSE}

ggplot(data = base, aes(bs_ee)) +
  geom_histogram()+
  labs(title = "Histogram bs_ee")+
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))
```

</br>

```{r ggplot_variables2, echo = FALSE, message = FALSE, warning = FALSE}
ggplot(data = base, aes(bs_h)) +
  geom_histogram()+
  labs(title = "Histogram bs_h")+
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))
```

</br>

```{r ggplot_variables3, echo = FALSE, message = FALSE, warning = FALSE}
ggplot(data = base, aes(ffp_ps)) +
  geom_histogram()+
  labs(title = "Histogram ffp_ps")+
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))
```

</br>

```{r ggplot_variables4, echo = FALSE, message = FALSE, warning = FALSE}
ggplot(data = base, aes(fh_pr)) +
  geom_histogram()+
  labs(title = "Histogram fh_pr")+
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))

```

```{r summary_1, echo = FALSE, message = FALSE, warning = FALSE} 
# Make the summary of the variable in descriptive statistics and the normal histogram showing that most
# of cases is left, near zero, with some outliers.

m1 <- mean(base$Applied)

```

The dependent variable "Applied" was extracted from the UNHCR database, which shows the number of refuge requests on each year analyzed, from Syrian citizens for each country on the analysis. The descriptive statistics of the independent variable "Applied" will then be presented. The "Applied" variable presented a mean of ``r m1`.


```{r histo_1, echo = FALSE, message = FALSE, warning = FALSE} 
# Make the summary of the variable in descriptive statistics and the normal histogram showing that most
# of cases is left, near zero, with some outliers.

hist(base$Applied)

```

After the selection of the variables, tests with the logarithmic transformation are made. It's possible to notice that the distribution is almost normal. The log is used once it's assumed that the distribution of the variable has a bias, therefore, one of the extremities has a long tail, and once it's measured as correlation or regression, it can be greatly influenced by peak distribution, outliers, among others. The transformation can reduce the bias effect.
After the logatithmic transformation, and with the variables ready for the analysis, it is going to be used linear regression models, to process and present the results (summary). The linear regressions were made separately with the objective of not reducing too much the cases since the bs_ee and bs_h variables are present in different countries than the "ffp_ps" and "fh_pr". Then it's decided to set up four linear regression models, one for the political rights and public services variables in 2011, one for these variables in 2015, and one for the equitable education, health and political rights variables in 2011 and other for these variables in 2015.

```{r summary_2, echo = FALSE, message = FALSE, results='hide',warning = FALSE} 
# log analysis
summary(log(base$Applied))
```

```{r histo_2, echo = FALSE, message = FALSE, warning = FALSE} 
# log analysis

hist(log(base$Applied))
```

```{r base_log, echo = FALSE, message = FALSE, warning = FALSE} 
# transformation to log - creation of the variable in log

base$LogApplied <- log(base$Applied)
base$LogApplied[base$LogApplied == -Inf] <- NA

ggplot(data = base, aes(LogApplied)) +
  geom_histogram()+
  theme_minimal()
```

The four models have the objective of explaining in as much detail as possible the motivations that led the Syrian refugees to apply for asylum in the European countries analyzed in the years 2011 and 2015.
Then it's made a code to produce a table with the regression results. Will be a table in a text type, with the title "Model Results", in an American Journal of Political Science Style, including p-values.
After that, dispersion graphics indicating the relationship between the variables and add regression line are made. 

```{r base_years, echo = FALSE, message = FALSE, warning = FALSE} 
# Creating separate databases by year

base2011 <- filter(base, year == 2011)
base2015 <- filter(base, year == 2015)
```

First we check the association, in a scatter plot, between the variables "Health" and "Applied". The correlation result between the variables was low, 0.27, and positive, indicating that the association between the variables is imprecise but that to some extent, when one variable increases, the other decreases, being proportional.

```{r base_correlation, echo = FALSE, message = FALSE, warning = FALSE, results='hide'}
# Creating a correlation between the LogApplied and bs_h using pairwise

cor(base$bs_h, base$LogApplied, use = "p")

```

As an additional analysis, we constructed graphs of association between the variables, seeking to identify possible non-linear relationships.

Concerning the graphic that associates the variables "number of refuge requests" and "public services", we can see that as public services increase, the number of requests for refuge decreases, in 2011.

```{r model_1_1, echo = FALSE, message = FALSE, warning = FALSE}
# model1
ggplot(base2011, aes(x = ffp_ps, y = LogApplied)) + geom_point() + 
  labs(title = "Scatter-plot Public Services X Number of refuge requests", x ="Public Services", y = "Number of refuge requests") +
  geom_smooth(method="lm", se = F) +
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))
```

Concerning the graph that associates the variables "number of refuge requests" and "Health and equitable education", we can see that as the Health and Equitable education index increases, the number of refugee requests increases, in 2011.

```{r model_1_2, echo = FALSE, message = FALSE, warning = FALSE}
# model2
ggplot(base2011, aes(x = bs_ee + bs_h, y = LogApplied)) + geom_point() +
  labs(title="Scatter-plot Health and Equitable Education X Number of refuge requests", x ="Health and Equitable Education", y = "Number of refuge requests") +
  geom_smooth(method="lm", se = F) +
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))
```

Concerning the graphic that associates the variables "number of refuge requests" and "public services", we can see that as public services increase, the number of requests for refuge decreases, in 2015, following the same pattern as the 2011's results. 


```{r model_1_3, echo = FALSE, message = FALSE, warning = FALSE}
# model 3
ggplot(base2015, aes(x = ffp_ps, y = LogApplied)) + geom_point() + 
  labs(title="Scatter-plot Public Services X Number of refuge requests", x ="Public Services", y = "Number of refuge requests") +
  geom_smooth(method="lm", se = F) +
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))
```

Concerning the graph that associates the variables "number of refuge requests" and "Health and equitable education", we can see that as the Health and Equitable education index increases, the number of refugee requests increases, in 2015, following the same pattern of results of 2011. 


```{r model_1_4, echo = FALSE, message = FALSE, warning = FALSE}
# model 4
ggplot(base2015, aes(x = bs_ee + bs_h, y = LogApplied)) + geom_point() + 
  labs(title="Scatter-plot Health and Equitable Education X Number of refuge requests", x ="Health and Equitable Education", y = "Number of refuge requests") +
  geom_smooth(method="lm", se = F) +
  theme_minimal()+
  theme(plot.title = element_text(hjust = 0.5))
```

In association graphs, we can not find nonlinear relationships. Therefore, we will carry out the analyzes without including polynomials in the models.


Variable's description table

 | Variable code | Variable name | 
 |---------------|---------------|
 | Applied | Number of refuge requests | 
 | ffp_ps | Public Services | 
 | bs_ee | Equitable Education | 
 | bs_h | Health | 
 | fh_pr | Political Rights | 
 *source: own elaboration* 


Results
============

To answer the research question, we used 4 multiple linear regression models, alternating the independent variables of the model and the analyzed years.

```{r model_1, echo = FALSE, message = FALSE, warning = FALSE}
model1 <- lm(LogApplied ~ ffp_ps + fh_pr, data = base2011)
model2 <- lm(LogApplied ~ bs_ee + bs_h + fh_pr, data = base2011)
model3 <- lm(LogApplied ~ ffp_ps + fh_pr, data = base2015)
model4 <- lm(LogApplied ~ bs_ee + bs_h + fh_pr, data = base2015)
```

Regarding the first model, which refers to the year 2011, with the dependent variable LogApplied, the independent Public Services and the control variable Political Rights.
The variable Public Services had a negative effect on the application of requests for refugees from Syrians in the countries analyzed. The p-value was very close to the 5% threshold. The control variable Political Rights did not present statistical significance in the model. The r2 of the model presented a median magnitude, since it revealed a prediction capacity of 10% of the variance of the dependent variable.

```{r summary_3.1, echo = FALSE, message = FALSE, warning = FALSE, results='asis'}
stargazer::stargazer(model1, type = "latex", title = "Resultados do Modelo 1", p.auto=FALSE, header = FALSE, style = "apsr", no.space=TRUE)
```

As for the second model, which refers to the year 2011, with the dependent variable LogApplied, and the independent Equitable Education and Health, in addition to the control variable, Political Rights,
it is noteworthy that in this model 2, none of the variables had a significant effect. This is also reflected in the r2 of the model, which is close to zero.

```{r summary_3.2, echo = FALSE, message = FALSE, warning = FALSE, results='asis'}
stargazer::stargazer(model2, type = "latex", title = "Resultados do Modelo 2", p.auto=FALSE, header = FALSE, style = "apsr",  no.space=TRUE)
```

The third model refers to the year 2015, with the dependent variable LogApplied, and the independent Public Services, in addition to the control variable, Political Rights.
It is notable that in this model 3,
the variable Public Services presented a negative and significant effect and the variable Political Rights did not present statistical significance.
Compared with model 1, which includes the same variables, but for the year 2011, the variable Public Services had its negative effect accentuated, and the r2 of the model became more expressive.

```{r summary_3.3, echo = FALSE, message = FALSE, warning = FALSE, results='asis'}

stargazer::stargazer(model3, type = "latex", title = "Model 3",  style = "apsr", no.space=TRUE, p.auto=FALSE, header = FALSE)
```

The fourth model is the one that presented the greatest explanatory capacity of the variance of the dependent variable.
It concerns the year 2015, with the dependent variable LogApplied, and the independent variables Equitable Education and Health, in addition to the control variable, Political Rights.
In the fourth model, the independent variable Health and the control variable Political Rights presented positive and significant effects. The variable Equitable Education did not present statistical significance.

```{r summary_3.4, echo = FALSE, message = FALSE, warning = FALSE, results = 'asis'}

stargazer::stargazer(model2, type="latex",title = "Model 4", p.auto=FALSE,  style = "apsr", no.space=TRUE, header = FALSE, ci=FALSE )

```

A summary of the four models analyzed is presented below. From it it is possible to see significant fluctuations in the effect of the variable Equitable Education; a relation that suggests that the control variable Political Rights has greater effect on th

```{r stargazer, echo = FALSE, message = FALSE, warning = FALSE, results='asis'}
stargazer(model1, model2, type = "latex", title = "Models Results", style = "apsr", no.space=TRUE, header = FALSE,  p.auto=FALSE, column.labels = c("Model 1", "Model 2"),  model.numbers = FALSE)

stargazer(model3, model4, type = "latex", title = "Models Results", style = "apsr", no.space=TRUE, header = FALSE, p.auto=FALSE, column.labels = c("Model 3", "Model 4"),  model.numbers = FALSE)

```


Assumptions
====================

After the data results, it's possible to realize that the data is homocedastic since there is no pattern visible in the dispersion of the error.
When the histogram of the descriptive statistics is made, such as it's summary, it's possible to realize that most of the cases are on the left, near zero, with some outliers.
This can be proved with the summary at the analysis, where is possible to realize that the 1st. qu and median are on numbers way below the mean and the others quarters. When the log enters on the analysis, it's possible to realize that the differences are smaller and the universe of analysis os smaller as well. With this proof, the variabel is transformed into log.
After that, a descriptive summary is made for each variable on the model, followed by an histogram. On the Equitable Education summary, it's possible to visualize that the rates maximum are 7.855 out of 10, and most of the cases are between the mean and the maximum, indicating that the equitable education in the analyzed countries are show good rates, above the mean.
When the Health is the variable analyzed, it's possible to percieve that, just like the Equitable Education summary, this summary shows that most of the cases are also above the mean.
When Public Services are analyzed, the results show the same tendency as the two prior variables. 
However, when the Political Rights is the variable analyzed, the tendency is that the cases are concentrated on "1" than on "7", which shows that the analyzed countries are free when the topic referred is political rights.

Then, separate databases are created by year, such as the models used in this paper. 
The first model has the variables Political Rights and Public Services referred to the number of refuge requests in 2011. The second model has the variables Equitable Education, Health and Political Rights referred to the number of refuge requests in 2011. The third model has the variables Political Rights and Public Services referred to the number of refuge requests in 2015. The fourth model has the variables Equitable Education, Health and Political Rights referred to the number of refuge requests in 2015.

- Checking the residuals normality:
  Below you can see the histograms of the residuals of the four models. We did not identify deviations of normality in the distribution of residues and all of them presented approximate mean zero.


```{r ggplot_resmodel_1, echo = FALSE, message = FALSE, warning = FALSE}
hist(residuals(model1),
     main = "Histogram Residuals Model 1")
```

```{r ggplot_resmodel_2, echo = FALSE, message = FALSE, warning = FALSE}
hist(residuals(model2),
     main = "Histogram Residuals Model 2")
```

```{r ggplot_resmodel_3, echo = FALSE, message = FALSE, warning = FALSE}
hist(residuals(model3),
     main = "Histogram Residuals Model 3")
```

```{r ggplot_resmodel_4, echo = FALSE, message = FALSE, warning = FALSE}
hist(residuals(model4),
     main = "Histogram Residuals Model 4")
```

- Checking heteroskedasticity:
  In the following figures, it is possible to visualize the graphs of the predicted values versus residuals of the four models. In none of them can we identify extreme values that would be indicative of the presence of heteroscedasticity. 

  
```{r ggplot_model_1, echo = FALSE, message = FALSE, warning = FALSE}
ggplot(data = model1, aes(x = fitted(model1), y=residuals(model1))) +
  geom_point() + 
  labs(title="Heteroscedasticity Model 1", x ="fitted (model1)", y = "residuals(model1)") +
  geom_hline (yintercept = 0, linetype = "dashed", color = "blue") +
  theme_minimal()
```

```{r ggplot_model_2, echo = FALSE, message = FALSE, warning = FALSE}
ggplot(data = model2, aes(x = fitted(model2), y=residuals(model2))) +
  geom_point() + 
  labs(title="Heteroscedasticity Model 2", x ="fitted (model2)", y = "residuals(model2)") +
  geom_hline (yintercept = 0, linetype = "dashed", color = "blue") +
  theme_minimal()
```

```{r ggplot_model_3, echo = FALSE, message = FALSE, warning = FALSE}
ggplot(data = model3, aes(x = fitted(model3), y=residuals(model3))) +
  geom_point() + 
  labs(title="Heteroscedasticity Model 3", x ="fitted (model3)", y = "residuals(model3)") +
  geom_hline (yintercept = 0, linetype = "dashed", color = "blue") +
  theme_minimal()
```

```{r ggplot_model_4, echo = FALSE, message = FALSE, warning = FALSE} 

ggplot(data = model4, aes(x = fitted(model4), y=residuals(model4))) +
  geom_point() + 
  labs(title="Heteroscedasticity Model 4", x ="fitted (model4)", y = "residuals(model4)") +
  geom_hline (yintercept = 0, linetype = "dashed", color = "blue") +
  theme_minimal() 
```

- Checking multicolinearity:
  Below it is possible to visualize the coefficients of inflation of the variance of the variables in the four models. None of the coefficients presented values higher than 7, indicating that we did not find evidence of presence of multicollinearity in the models.
  
```{r vif models, echo = FALSE, message = FALSE, warning = FALSE} 
# Model 1
vif(model1) 

# Model 2
vif(model2)

# Model 3
vif(model3)

# Model 4
vif(model4)
```


Conclusion
==============

Responding to the research question, it is notable that the variable "Public Services" was contrary to expectations when used as a Welfare State index, with a negative effect on the number of asylum applications of Syrian refugees in the European countries analyzed. In 2015, the negative effect was even more significant for this variable compared to 2011.
Corroborating this result, equity in education also had no effect on the number of asylum applications, either in 2011 or 2015.
On the other hand, the Health variable presented ambiguous results, not being significant in 2011, but having a positive and significant effect in 2015.
The work hypothesis was falsified, since, with the variables analyzed, no evidence was found of a positive relationship between the Welfare State and the number of asylum requests for Syrian refugees in European countries

References {#references .unnumbered}
==========
